package com.gilight.base.admin.freight;

import com.gilight.base.base.exception.ServiceException;
import com.gilight.base.dto.freight.FreightTemplateDTO;

import java.util.List;

/**运费模板
 * Created with IntelliJ IDEA.
 * Description:
 * User: kbq
 * Date: 2019-07-07
 * Time: 下午3:37
 */
public interface AdminFreightTemplateService {

    /**
     * 创建
     * @param title 模板名称
     * @param spuLocation 宝贝地址
     * @param deliveryDeadline 发货期限
     * @param defaultFreePrice 默认满价包邮系列,负数不包邮，0为包邮，正数为满多少包邮
     * @param defaultFirstWeight 首重，单位克
     * @param defaultFirstPrice  首费，单位分
     * @param defaultContinueWeight 续重
     * @param defaultContinuePrice  续费
     * @param carriageDOList 特殊运费区
     * @param adminId
     * @return
     * @throws ServiceException
     */
    public String create(
            String title,
            String spuLocation,
            Integer deliveryDeadline,
            Integer defaultFreePrice,
            Integer defaultFirstWeight,
            Integer defaultFirstPrice,
            Integer defaultContinueWeight,
            Integer defaultContinuePrice,
            List carriageDOList,
            Long adminId) throws ServiceException;

    /**
     * 删除
     * @param id        模板ID
     * @param adminId   管理员ID
     * @return
     * @throws ServiceException
     */
    public String delete(
            Long id,
            Long adminId) throws ServiceException;

    /**
     *
     * @param id
     * @param title 模板名称
     * @param spuLocation 宝贝地址
     * @param deliveryDeadline 发货期限
     * @param defaultFreePrice 默认满价包邮系列,负数不包邮，0为包邮，正数为满多少包邮
     * @param defaultFirstWeight 首重，单位克
     * @param defaultFirstPrice  首费，单位分
     * @param defaultContinueWeight 续重
     * @param defaultContinuePrice  续费
     * @param carriageDOList 特殊运费区
     * @param adminId
     * @return
     * @throws ServiceException
     */
    public String edit(
            Long id,
            String title,
            String spuLocation,
            Integer deliveryDeadline,
            Integer defaultFreePrice,
            Integer defaultFirstWeight,
            Integer defaultFirstPrice,
            Integer defaultContinueWeight,
            Integer defaultContinuePrice,
            List carriageDOList,
            Long adminId) throws ServiceException;

    /**
     * 查询
     * @param adminId
     * @return
     * @throws ServiceException
     */
    public List<FreightTemplateDTO> list(
            Long adminId) throws ServiceException;

}
